﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Bookify.Application.Abstractions.Caching
{
    public interface ICacheService
    {
        Task<T?> GetAsync<T>(string key,CancellationToken cancellationToken = default);
        Task SetAsync<T>(
            string key, 
            T value,
            TimeSpan? expiration = null,
            CancellationToken cancellationToken = default);
        Task RemoveAsync<T>(string key,CancellationToken cancellationToken = default);
    }
}
